package com.发布订阅模式;

/**
 * @author: wh(1835734390 @ qq.com)
 * @date: 2023/8/9 13:59
 * @description:
 * @version:
 */
public class EmailSubscriber implements Subscriber {
        private String email;

        public EmailSubscriber(String email) {
            this.email = email;
        }

        @Override
        public void receive (String message){
            System.out.println(this.email + "New email received: " + message);
        }
}


